﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebEntities.Models.Framework
{
    public class UIMenu
    {
        public const string FrontMenuType = "front";
        public const string BackMenuType = "back";

        public int MenuID { get; set; }
        public string MenuName { get; set; }
        public string MenuType { get; set; }
        public int? SortNum { get; set; }
        public string MenuUrl { get; set; }

        public static UIMenu AsUIMenu(FW_Menu menu)
        {
            UIMenu uimenu = new UIMenu
            {
                MenuID = menu.MenuID,
                MenuName = menu.MenuName,
                MenuType = menu.MenuType,
                SortNum = menu.SortNum,
                MenuUrl = menu.MenuUrl
            };
            return uimenu;
        }
    }
}
